package com.ququ.syb.business.account.fegin;


import com.ququ.common.result.Result;
import com.ququ.syb.common.pojo.AccountInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "account")
public interface AccountFegin {

    @RequestMapping(value = "/query")
    Result<AccountInfo> getAccountInfo(@RequestParam(value = "accountid") String accountid);

    @RequestMapping(value = "/list")
    Result<List<AccountInfo>> listAccountInfo(@RequestParam(value = "mobile") String mobile,
                                             @RequestParam(value = "idcardno") String idcardno,
                                             @RequestParam(value = "status") Integer status);

    @RequestMapping(value = "/save")
    Result<AccountInfo> saveAccountInfo(@RequestParam(value = "accountid") String accountid,
                                       @RequestParam(value = "name") String name,
                                       @RequestParam(value = "mobile") String mobile,
                                       @RequestParam(value = "accountname") String accountname,
                                       @RequestParam(value = "appcode") String appcode,
                                       @RequestParam(value = "partner") String partner,
                                       @RequestParam(value = "idcardno") String idcardno,
                                       @RequestParam(value = "allowpay") Integer allowpay,
                                       @RequestParam(value = "allowwithdraw") Integer allowwithdraw,
                                       @RequestParam(value = "token") String token,
                                       @RequestParam(value = "password") String password);

    @RequestMapping(value = "/update")
    Result<AccountInfo> updateAccountInfo(@RequestParam(value = "id") Integer id,
                                          @RequestParam(value = "accountid") String accountid,
                                          @RequestParam(value = "name") String name,
                                          @RequestParam(value = "mobile") String mobile,
                                          @RequestParam(value = "accountname") String accountname,
                                          @RequestParam(value = "appcode") String appcode,
                                          @RequestParam(value = "partner") String partner,
                                          @RequestParam(value = "idcardno") String idcardno,
                                          @RequestParam(value = "allowpay") Integer allowpay,
                                          @RequestParam(value = "allowwithdraw") Integer allowwithdraw,
                                          @RequestParam(value = "token") String token,
                                          @RequestParam(value = "password") String password,
                                          @RequestParam(value = "status") Integer status);
}
